﻿<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta http-equiv="pragma" content="no-cache" />
        <meta http-equiv="cache-control" content="no-cache" />
        <meta http-equiv="expires" content="0" />
        <title></title>
        <link rel="stylesheet" rev="stylesheet" href="{{$http_url}}/css/style.css" type="text/css" media="all" />
    </head>

    <body class="ContentBody">
        <form action="{{$http_url}}/user/updateUserDetail/" method="post"  name="form" >
            <div class="MainDiv">
                <table width="99%" border="0" cellpadding="0" cellspacing="0" class="CContent">
                    <tr>
                        <th class="tablestyle_title" >{{if $type ==1}}修改用户密码{{elseif $type ==2}}授权或取消授权{{/if}}</th>
                    </tr>
                    <tr>
                        <td class="CPanel">
                            <table border="0" cellpadding="0" cellspacing="0" style="width:100%">
                                <tr>
                                    <td width="100%">
                                        <fieldset style="height:100%;">
                                            <legend>用户信息</legend>
                                            <table border="0" cellpadding="2" cellspacing="1" style="width:100%">
                                                <tr>
                                                    <td nowrap align="right" width="15%">用户名:</td>
                                                    <td width="35%">{{$detail.0.username}}</td>
                                                </tr>
                                                <tr>
                                                    <td nowrap align="right" width="15%">IC卡号:</td>
                                                    <td width="35%">{{$detail.0.card}}</td>
                                                </tr>
                                                {{if $detail.0.nickname}}
                                                <tr>
                                                    <td nowrap align="right" width="15%">用户别名:</td>
                                                    <td width="35%">{{$detail.0.nickname}}</td>
                                                </tr>
                                                {{/if}}
                                                {{if $type == 1}}
                                                <tr>
                                                    <td nowrap align="right" width="15%">新密码:</td>
                                                    <td width="35%"><input id="txtpassword" name='txtpassword' type="password" class="text" style="width:154px" onpaste="return false" /><span class="red">*{{if $type==1}}{{$pwdTxt.txt}},{{$pwdTxt.length}}位{{/if}}</span></td>
                                                </tr>
                                                <tr>
                                                    <td nowrap align="right" width="15%">确认密码:</td>
                                                    <td width="35%"><input id="txtpassword_confirm" name='txtpassword_confirm' type="password" class="text" style="width:154px" onpaste="return false" />
                                                        <span class="red">*</span></td>
                                                </tr>
                                                {{/if}}
                                                {{if $type == 1}}
                                                <tr>
                                                    <td nowrap align="right" width="15%">所属部门:</td>
                                                    <td width="35%">{{if $detail.0.group_nickname=="null"}}无所属部门{{else}} {{$detail.0.group_nickname}} {{/if}}</td>
                                                </tr>
                                                <tr>
                                                    <td nowrap align="right" width="15%">权限:</td>
                                                    <td width="35%">{{if $detail.0.is_admin ==3}}回收光盘{{elseif $detail.0.is_admin ==2}}审核申请{{elseif $detail.0.is_admin==1}}普通{{else}}没有权限{{/if}}</td>
                                                </tr>
                                                <br>
                                                <tr>
                                                    <td nowrap align="right" width="15%">密级:</td>
                                                    <td width="35%">{{$level}}</td>
                                                </tr>
                                                <tr>
                                                    <td nowrap align="right" width="15%">登陆方式：</td>
                                                    <td width="35%">{{if $detail.0.login_land ==1}}用户名/密码登录{{elseif $detail.0.login_land ==2}}USBKey登录{{elseif $detail.0.login_land ==3}}门户系统集成登录{{else}}暂无登陆方式{{/if}}</td>
                                                </tr>
                                                {{else}}
                                                <tr>
                                                    <td nowrap align="right" width="15%">所属部门:</td>
                                                    <td width="35%">{{if $detail.0.group_nickname=="null"}}无所属部门{{else}} {{$detail.0.group_nickname}} {{/if}}</td>
                                                </tr>
                                                <tr>
                                                    <td nowrap align="right" width="15%">密级:</td>
                                                    <td width="35%">{{$level}}</td>
                                                </tr>
                                                <tr>
                                                    <td nowrap align="right" width="15%">权限:</td>
                                                    <td width="35%">
                                                        <select name="is_audit" id="is_audit">
                                                            <option value="null" {{if !is_numeric($detail.0.is_admin) }}selected="selected"{{/if}}>未授权</option>
                                                            <option value="0" {{if is_numeric($detail.0.is_admin) && $detail.0.is_admin ==0}}selected="selected"{{/if}}>普通用户</option>
                                                            <option value="1" {{if is_numeric($detail.0.is_admin) && $detail.0.is_admin ==1}}selected="selected"{{/if}}>审核用户</option>
                                                            <option value="2" {{if is_numeric($detail.0.is_admin) && $detail.0.is_admin ==2}}selected="selected"{{/if}}>回收账号</option>
                                                        </select>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td nowrap align="right" width="15%">登陆方式：</td>
                                                    <td width="35%">
                                                        <select name="login_land">
                                                            <option value="0" {{if $detail.0.login_land  ==0}}selected="selected"{{/if}}>未选择登录方式</option>
                                                            <option value="1" {{if $detail.0.login_land  ==1}}selected="selected"{{/if}}>用户名/密码登录</option>
                                                            <option value="2" {{if $detail.0.login_land  ==2}}selected="selected"{{/if}}>USBKey登录</option>
                                                            <option value="3" {{if $detail.0.login_land  ==3}}selected="selected"{{/if}}>门户系统集成登录</option>
                                                        </select>
                                                    </td>
                                                </tr>
                                                {{/if}}
                                            </table>
                                            <br />
                                        </fieldset></td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" align="center" height="50px">
                            <input id="submit_button" type="submit" name="submit" value="提交" class="button" />
                            <input type="button" name="Submit2" value="返回" class="button" onclick="window.location='{{$http_url}}/user/userList/'"/>
                        </td>
                    </tr>
                </table>
            </div>
            <input type="hidden" id="type" name="type" value="{{$type}}">
            <input type="hidden" name="userid" value="{{$userid}}">
        </form>
        <script type="text/javascript" src="{{$http_url}}/js/jquery.min.js"></script>
        <script type="text/javascript" src="{{$http_url}}/js/authentication.js"></script>
        <script type="text/javascript">
            $(document).ready(function(){
                $("#submit_button").click(function(){
                    var pwd=$("#txtpassword").val();
                    if(pwd){
                        if($("#txtpassword").val() !=$("#txtpassword_confirm").val()){
                            alert("确认密码与密码不同,请重新输入!");
                            return false;
                        }
                     }
                });
            })
        </script>
    </body>
</html>
